package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"ruoyi-vue-pro-go/api/common"
	"ruoyi-vue-pro-go/internal/model/entity"
)

type GetOneReq struct {
	g.Meta `path:"/admin-api/system/dict-data/get" method:"get" tags:"Dict" permission:"system:dict:query" summary:"Get dict data by id"`
	Id     uint `v:"required" dc:"dict data id"`
}
type GetOneRes struct {
	*entity.SystemDictData `dc:"dict data"`
}

type GetListReq struct {
	g.Meta `path:"/admin-api/system/dict-data/simple-list" method:"get" tags:"Dict" summary:"Get dict list"`
}
type GetListRes struct {
	List []*entity.SystemDictData `json:"list" dc:"dict list"`
}

type GetPageReq struct {
	g.Meta `path:"/admin-api/system/dict-data/page" method:"get" tags:"Dict Page" summary:"Get dict pages"`
	*common.CommonPageReq
	Label    string `json:"label" dc:"label"`
	DictType string `json:"dict_type" dc:"dict type"`
	Status   int    `dc:"status"`
}
type GetPageRes struct {
	List []*entity.SystemDictData `json:"list" dc:"dict pages"`
	*common.CommonPageRes
}

type CreateReq struct {
	g.Meta    `path:"/admin-api/system/dict-data/create" method:"post" tags:"Dict" permission:"system:dict:create" summary:"Create dict data"`
	Sort      string `v:"required" dc:"字典排序"` // 字典排序
	Label     string `v:"required" dc:"字典标签"` // 字典标签
	Value     string `v:"required" dc:"字典键值"` // 字典键值
	DictType  string `v:"required" dc:"字典类型"` // 字典类型
	Status    string `v:"required" dc:"字典状态"` // 状态（0正常 1停用）
	ColorType string // 颜色类型
	CssClass  string // css 样式
	Remark    string // 备注
	Creator   string `dc:"创建人"`
	Updater   string `dc:"更新人"`
}
type CreateRes struct{}

type DeleteReq struct {
	g.Meta `path:"/admin-api/system/dict-data/delete" method:"delete" tags:"Dict" permission:"system:dict:delete" summary:"Delete dict data"`
	Id     int64 `v:"required" dc:"dict data id"`
}
type DeleteRes struct{}

type DeleteListReq struct {
	g.Meta `path:"/admin-api/system/dict-data/delete-list" method:"delete" tags:"Dict" permission:"system:dict:delete" summary:"Delete dict data list"`
	Ids    string `v:"required" dc:"dict data id list"`
}
type DeleteListRes struct{}

type UpdateReq struct {
	g.Meta    `path:"/admin-api/system/dict-data/update" method:"put" tags:"Dict" permission:"system:dict:update" summary:"Update dict data"`
	Id        int64  `v:"required" dc:"dict data id"`
	Sort      string `v:"required" dc:"字典排序"` // 字典排序
	Label     string `v:"required" dc:"字典标签"` // 字典标签
	Value     string `v:"required" dc:"字典键值"` // 字典键值
	DictType  string `v:"required" dc:"字典类型"` // 字典类型
	Status    string `v:"required" dc:"字典状态"` // 状态（0正常 1停用）
	ColorType string // 颜色类型
	CssClass  string // css 样式
	Remark    string // 备注
	Creator   string `dc:"创建人"`
	Updater   string `dc:"更新人"`
}
type UpdateRes struct{}

type ExportExcelReq struct {
	g.Meta `path:"/admin-api/system/dict-data/export-excel" method:"get" tags:"Dict" permission:"system:dict:export" summary:"Export dict data excel"`
}
type ExportExcelRes struct {
	g.Meta `mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" type:"string" example:"<file content>"`
}
